package io.gitee.welson.sensitive.exception;


/**
 * 导出失败异常
 *
 * @author welson
 */
public class ExportFailedException extends SensitiveExportException {
    
    private static final long serialVersionUID = 1L;

    /**
     * 失败的数据行号
     */
    private final int failedRowIndex;

    /**
     * 失败的Sheet页索引
     */
    private final int failedSheetIndex;

    public ExportFailedException(String message, int failedRowIndex, int failedSheetIndex) {
        super(message);
        this.failedRowIndex = failedRowIndex;
        this.failedSheetIndex = failedSheetIndex;
    }

    public ExportFailedException(String message, Throwable cause, int failedRowIndex, int failedSheetIndex) {
        super(message, cause);
        this.failedRowIndex = failedRowIndex;
        this.failedSheetIndex = failedSheetIndex;
    }

    public int getFailedRowIndex() {
        return failedRowIndex;
    }

    public int getFailedSheetIndex() {
        return failedSheetIndex;
    }
}